<div class="border mt20 clearfix">
    <div class="left-list" id="leftList">
        <div class="left-list-bd"></div>
        <div class="clearfix" style="padding:10px;"><a href="javascript:;" class="fl btn btn-yellow permission p-500309-11" id="btn_add_type"><i class="btn-icon-add"></i>新增类别</a></div>
        <div id="type_tree"><span style="padding:3px 3px 3px 8px;">加载中...</span></div>
    </div>
    <div class="left-list-con" id="leftListCon">
        <div class="grid-header">
            <span class="fl f14 lh30 text-indent">知识列表：</span>
            <a href="javascript:;" class="fr btn btn-yellow permission p-500309-11" id="btn_add"><i class="btn-icon-add"></i>新增知识</a>
        </div>
        <div id="grid" class="sheet">
            <table width="100%">
                <thead>
                    <tr class="thead ta-l">
                        <th height="30" width="260">标题</th>
                        <th>关键词</th>
                        <th width="130">创建时间</th>
                        <th width="70">操作</th>
                    </tr>
                </thead>
                <tbody class="ta-l" id="knowledge_tbl">
                    <tr><td colspan="4"><div class="no-data"><span>暂无数据</span></div></td></tr>
                </tbody>
            </table>
        </div>
        <div id="pager" class="pagination"></div>
    </div>
</div>
<script type="text/html" id="tbl_row_tmpl">
{{each list as value i}}
    <tr>
        <td height="30">
            {{value.title}}
        </td>
        <td>
            {{value.keywords}}
        </td>
        <td class="lh14">
            {{value.CreatedOn}}
        </td>
        <td id="{{value.b_knowledgeId}}">
            <div class="js-oper-btn" style="display: none;">
            <a href="javascript:;" class="fl mr10 permission p-500309-11-inline-block"><i class="icon-op icon-op-edit"></i></a>
            <a href="javascript:;" class="fl mr10 permission p-500309-11-inline-block"><i class="icon-op icon-op-del"></i></a>
            </div>
        </td>
    </tr>
{{/each}}
</script>

<style>
    .form-line{ margin-bottom: 5px; }
    .form-line-tip{color: #A4A4A4; margin-left: 5px; font-size: 12px; }
    .form-line js-err{ margin-top:2px;}
    .jqtree-tree{ border:none;}
    .left-list-op{ display: none;}
    #type_tree li:hover .left-list-op, #type_tree li.jqtree-selected .left-list-op{ display: block;}
    .jqtree-tree .jqtree-element:hover{ background-color: transparent;}
</style>
<script id="addtype_tmpl" type="text/html">
    <div style="margin-left:30px;margin-top:10px;">
        <div class="clearfix form-line">
            <label class="fl" style="height:30px;line-height:30px;">类别名称：</label>
            <div class="fl">
                <input id="txt_type_name" class="input-text" style="width:220px;" text="text" maxlength="8" value="{{type_name}}"/><span class="form-line-tip">最多8字</span>
                <div class="c-red f13 js-err"></div>
            </div>
        </div>
    </div>
</script>


<!-- 新增知识 -->
<script id="add_knowledge_tmpl" type="text/html">
<div class="f14" style="max-height: 550px;overflow: auto;">
    <table width="100%">
        <tr>
          <td width="160" align="right" class="form-cell" valign="top">类别名称：</td>
          <td class="cell-split-s"><p class="lh30">{{type_name}}</p></td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top">关键词：</td>
          <td class="cell-split-s"><input type="text" id="txt_keywords" class="input-text fl mr10" maxlength="20" value="{{keywords}}" style="width:350px" /><p class="c-gray lh30 f12">多个关键词请用空格隔开，最多20字</p>
              <p class="c-red lh30 none js-err" style="clear:both;"></p>
          </td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>封面图片地址：</td>
          <td class="cell-split-s">
                <div id="fileupload" class="fileinput-button fl">
                    <div class="upload-wrap" id="img_wrap">
                        {{if cover_pic_url && cover_pic_url != ""}}
                              <img src="{{cover_pic_url}}" alt="" />
                        {{else}}
                              <div class="upload-btn"><i class="upload-icon"></i></div>
                        {{/if}}
                    </div>
                    <input type="file" name="file" accept="image/*"/>
                    <div class="fl lh30 mt20">
                        <p class="c-gray f12">建议尺寸：640*180像素</p>
                          <span >
                              <span class="c-blue f12">上传图片</span>
                          </span>
                    </div>
                </div>
                <input type="hidden" id="cover_pic_url" value="{{cover_pic_url}}" />
                <p class="c-red lh30 none js-err" style="clear:both;"></p>
            </td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top">详细页面是否展示封图：</td>
          <td class="cell-split">
            <div class="switch fl {{if show_pic == 1}}switch-on{{else}}switch-off{{/if}}" id="rbt_show_pic">
                <span class="switch-text">{{if show_pic == 1}}开{{else}}关{{/if}}</span>
                <span class="switch-white"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>标题：</td>
          <td class="cell-split-s"><input type="text" id="txt_title" class="input-text fl mr10" value="{{title}}" style="width:350px" maxlength="20" /><p class="c-gray lh30 f12">最多20字</p>
              <p class="c-red lh30 none js-err" style="clear:both;">不能为空</p>
          </td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top">简介：</td>
          <td class="cell-split-s"><textarea type="text" id="txt_intro" class="fl textarea mr10" style="width:350px; height:70px" maxlength="200">{{intro}}</textarea><p class="c-gray lh30 f12" style="padding-top:45px">限制200个字符</p>
              <p class="c-red lh30 none js-err" style="clear:both;">超出字符长度限制</p>
          </td>
        </tr>
        <tr>
          <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>图文详细页内容：</td>
          <td class="cell-split-s">
            <script id="editor" type="text/plain" style="width:550px;height:130px;"></script>
            <p class="c-red lh30 none js-err" style="clear:both;">不能为空</p>
          </td>
        </tr>
    </table>
</div>
</script>